package com.foreknow.mapping;

import com.foreknow.model.Food;

import java.sql.ResultSet;
import java.sql.SQLException;

public class FoodMapping implements EntityMapping{
    @Override
    public Object mapping(ResultSet rs) throws SQLException {
        Food food  = new Food();
        food.setFoodId(rs.getInt("foodId"));
        food.setFoodName(rs.getString("foodName"));
        food.setFoodExplain(rs.getString("foodExplain"));
        food.setFoodImg(rs.getString("foodImg"));
        food.setFoodPrice(rs.getDouble("foodPrice"));
        food.setBusinessId(rs.getInt("businessId"));
        food.setRemarks(rs.getString("remarks"));
        return food;
    }
}
